package boundary;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;

import controller.ParkingLotWorkerController;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ParkingLotWorkerGui extends JPanel{
	public ParkingLotWorkerGui() {
		setLayout(null);
		
		JButton btnCheckout = new JButton("car checkout");
		btnCheckout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ParkingLotWorkerController plw=new ParkingLotWorkerController();
				plw.carCheckout();
			}
		});
		btnCheckout.setBounds(131, 88, 150, 23);
		add(btnCheckout);
		
		JButton btnInitializeParkingSpot = new JButton("initialize Parking Spot");
		btnInitializeParkingSpot.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ParkingLotWorkerController plw=new ParkingLotWorkerController();
				plw.initParkingLot();
			}
		});
		btnInitializeParkingSpot.setBounds(94, 36, 211, 23);
		add(btnInitializeParkingSpot);
		
		JButton btnDisablesaveParkingSpot = new JButton("disable/save/activate Parking Spot");
		btnDisablesaveParkingSpot.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ParkingLotWorkerController plw=new ParkingLotWorkerController();
				plw.disableSaveActivatePspot();
			}
		});
		btnDisablesaveParkingSpot.setBounds(110, 149, 205, 23);
		add(btnDisablesaveParkingSpot);
	}
	JFrame frame;
	JPanel lastPanel;
	public void setLastPanel (JPanel panel)
	{
		this.lastPanel=panel;
	}
	public void setFrame (JFrame frame)
	{
		this.frame=frame;
	}

}
